package com.dartfar.news.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.dartfar.base.dao.DaoUtil;
import com.dartfar.base.model.Person;
import com.dartfar.base.service.BaseServiceImpl;
import com.dartfar.news.model.News;
import com.dartfar.organize.model.Department;

@Component("newsService")
public class NewsServiceImpl extends BaseServiceImpl<News> implements NewsService {

	@Resource
	private DaoUtil<News> newsDaoUtil;

	@Override
	public List<News> getListByAut(String code, Person person, Department depart, int pageNo, int pageSize) {
		// TODO Auto-generated method stub
		String hql = "from News";
		return newsDaoUtil.getListForPageByAut(hql, code, person, depart, pageNo, pageSize);
	}
	
	@Override
	public Long getCountByAut(String code, Person person, Department depart){
		String hql = "from News";
		return newsDaoUtil.getCountByAut(hql, code, person, depart);
	}
	



}
